#include <cstdio>
#include <vector>
#include <array>
#include <algorithm>
#include <cmath>

using namespace std;

// method 1: brute force

static int fuck66() {
    static array<int, 6> v {0, 1, 1, 1, 1, 1};
    ++v[0];
    for (int i = 0; i < v.size(); ++i) {
        if (v[i] < 7)
            break;
        ++v[i + 1];
        v[i] = 1;
    }
    return v[0] + v[1] + v[2] + v[3] + v[4] + v[5];
}

static int fuck94() {
    static array<int, 9> v {0, 1, 1, 1, 1, 1, 1, 1, 1};
    ++v[0];
    for (int i = 0; i < v.size(); ++i) {
        if (v[i] < 5)
            break;
        ++v[i + 1];
        v[i] = 1;
    }
    return v[0] + v[1] + v[2] + v[3] + v[4] + v[5] + v[6] + v[7] + v[8];
}

static void method_one() {
    vector<int> v66;
    while (true) {
        v66.push_back(fuck66());
        if (v66.back() == 36)
            break;
    }
    sort(v66.begin(), v66.end());

    vector<int> v94;
    while (true) {
        v94.push_back(fuck94());
        if (v94.back() == 36)
            break;
    }
    sort(v94.begin(), v94.end());

    double count = 0;
    for (auto e94: v94) {
        for (auto e66 : v66) {
            if (e94 > e66)
                ++count;
            else 
                break;
        }
    }
    printf("%.7f\n", 5e-8 + count / (v66.size() * v94.size()));
}

// method 2: probability ditribution

template<typename T> 
static vector<T> convolve(const vector<T>& x, const vector<T>& h) {
    int n = x.size();
    int m = h.size();
    int output_size = n + m - 1;
    vector<T> y (output_size);
    for (int i = 0; i < output_size; ++i) {
        for (int k = 0; k < n; ++k) {
            if (0 <= i - k && i - k < m)
                y[i] += x[k] * h[i - k];
        }
    }
    return y;
}

static vector<pair<int, int>> fuck9466(int num_of_dices, int num_of_faces) {
    vector<int> a (num_of_faces, 1);
    vector<int> b (num_of_faces, 1);
    for (int i = 1; i < num_of_dices; ++i) 
        b = convolve(b, a);

    int base = num_of_dices * 1;
    vector<pair<int, int>> v;
    for (auto e : b)
        v.push_back({base++, e});
    return v;
}

static void method_two() {
    vector<pair<int, int>> vp66 = fuck9466(6, 6);
    vector<pair<int, int>> vp94 = fuck9466(9, 4);
    double count = 0;
    for (auto ep94 : vp94) {
        for (auto ep66 : vp66) {
            if (ep94.first > ep66.first)
                count += ep94.second * ep66.second;
        }
    }
    printf("%.7f\n", 5e-8 + count / (pow(6, 6) * pow(4, 9)));
}

int main(int argc, char* argv[]) {
    if (argv[1] && argv[1][0] == '1') 
        method_one();
    else 
        method_two();
}